import { Component } from 'react'
import { View, Text } from '@tarojs/components'
import { connect } from 'react-redux'
import { setUser } from '@/actions/user'
import './index.scss'

@connect(
  ({ user }) => ({ user: user.userInfo }),
  dispatch => ({
    setUserInfo(userInfo) {
      dispatch(setUser(userInfo))
    }
  })
)
class Index extends Component {

  componentDidMount() {
    console.log(this.props.user)
  }
  render() {
    return (
      <View className='index'>
        <Text> Hello world!123</Text >
      </View>
    )
  }
}
export default Index